import json
import os



# 定义基础的url


BASE_URL = "http://ihrm-test.itheima.net"

BASE_DIR = os.path.dirname(os.path.abspath(__file__))



def build_data():
    file =BASE_DIR+"/data/login.json"
    test_data = []
    f = open(file,encoding="utf-8")
    json_data = json.load(f)
    for case_data in json_data:
        login_data = case_data.get("login_data")
        status_code = case_data.get("status_code")
        code = case_data.get("code")
        success = case_data.get("success")
        message = case_data.get("message")
        test_data.append((login_data,status_code,code,success,message))
    return test_data


print(build_data())